<?php $this->headScript()->prependFile($this->basePath() . '/js/atividade-crud.js')						 
						 ->prependFile($this->basePath() . '/js/jquery.validate.js') ?>

<?php 
$form = $this->form;
$this->form->setAttribute(
    'action', $this->url('atividade/default', 
    array(
        'controller' => 'atividade', 
        'action' => $this->action, 
        'id' => $this->id
    )
));

$this->form->prepare();
?>

<div class="ttoolbar">
	<ul id="mapa">
		<li class="first"></li>
		<li class="iten">
			<a href="<?php echo $this->url('home')?>" title="Página Inicial">Página Inicial</a>
		</li>
		<li class="separator"></li>
		<li class="iten">
			<a href="<?php echo $this->url('atividade')?>" title="Lista de Atividades">Lista de Atividades</a>
		</li>
		<li class="separator"></li>
		<li class="iten">
			<span title="Atividade">Atividade (cód: <?php echo $this->id ?>)</span>
		</li>
	</ul>
	<div class="buttons_toolbar">
		<a id="back" href="<?php echo $this->url('atividade') ?>" class="ico_back" title="Voltar"></a>
		<a id="save" class="ico_save" title="Salvar"></a>
	</div>
</div>

 <?php echo $this->flashMessage(); ?>

<div class="form_container">
	<?php echo $this->form()->openTag($this->form) ?>
	<div class="box">
		<div class="box_header">
			<span class="icon">
				<i class="icon-align-justify"></i>
			</span>
			<span class="title">Atividade</span>
		</div>
		<div class="box_content">
		
			<?php echo $this->formHidden($form->get('id')) ?>
			
			<div class="control-group">
				<div class="controls">
					<?php echo $this->formHidden($form->get('security')) ?>
			        <?php echo $this->formElementErrors($form->get('security')); ?>
				</div>
			</div>
			
			<div class="control-group">
				<?php echo $this->formlabel($form->get('titulo')) ?>
				<div class="controls">
					<?php echo $this->formInput($form->get('titulo')) ?>
					<?php echo $this->formElementErrors($form->get('titulo')); ?>
				</div>
			</div>
			
			<div class="control-group">
				<?php echo $this->formlabel($form->get('descricao')) ?>
				<div class="controls">
					<?php echo $this->formTextarea($form->get('descricao')) ?>
					<?php echo $this->formElementErrors($form->get('descricao')); ?>
				</div>
			</div>	
			
		</div>
	</div>
	
	
	<?php echo $this->form()->closeTag() ?>
	
</div>